Makefile configuration failed for user-defined studbom
Hi, everyone!
I am trying to add my own program as a stubdom. I failed several times with the Makefile. I have add my own party in xen/stubdom/Makefile. It works fine except the mini-os section saying that no rule for target APP_OBJS
I only modified the xen/stubdom/Makefile and configure.ac. Can anyone help me with this problem. Thanks a lot.
~~~~~~~~~~~~~~~~~~~~ I added this part into the Makefile in stubdom
.PHONY: libvmi-stubdom
libvmi-stubdom: mini-os-$(XEN_TARGET_ARCH)-libvmi libxc libvmi
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/libvmi/minios.cfg" $(MAKE ) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/libvmi/example/process-list.a
~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Du Yukun
Hi, everyone!
I am trying to add my own program as a stubdom. I failed several times with theMakefile. I have add my own party in xen/stubdom/Makefile. It works fine except the mini-os section saying that no rule for targetAPP_OBJS
Please post the actual error message.
Please also post in plain text and avoid wrapping (since it is important to the Makefile syntax). In fact it might be best to post your modifications (all of them) as a patch to remove any ambiguity.
Quoted 8 lines
I only modified the xen/stubdom/Makefile and configure.ac. Can anyone help me with this problem. Thanks a lot.
~~~~~~~~~~~~~~~~~~~~ I added this part into theMakefilein stubdom .PHONY: libvmi-stubdom
libvmi-stubdom: mini-os-$(XEN_TARGET_ARCH)-libvmi libxc libvmi DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)"
Quoted 8 lines
MINIOS_CONFIG="$(CURDIR)/libvmi/minios.cfg" $(MAKE ) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/libvmi/example/process-list.a
~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Hi, Ian
The error message is this:
``` make[2]: Leaving directory `/usr/src/xen-4.6.0/stubdom/libvmi' make[1]: Leaving directory `/usr/src/xen-4.6.0/stubdom/libvmi' DEF_CPPFLAGS="-isystem /usr/src/xen-4.6.0/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem /usr/src/xen-4.6.0/stubdom/../tools/xenstore/include -isystem /usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86 -isystem /usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem /usr/src/xen-4.6.0/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include -isystem /usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include -isystem /usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include/ipv4 -isystem /usr/src/xen-4.6.0/stubdom/libvmi/libvmi -I/usr/src/xen-4.6.0/stubdom/include -I/usr/src/xen-4.6.0/stubdom/../xen/include" DEF_CFLAGS="-mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -fno-stack-protector -fno-exceptions" DEF_LDFLAGS="-nostdlib -L/usr/src/xen-4.6.0/stubdom/cross-root-x86_64/x86_64-xen-elf/lib" MINIOS_CONFIG="/usr/src/xen-4.6.0/stubdom/libvmi/minios.cfg" make DESTDIR= -C /usr/src/xen-4.6.0/stubdom/../extras/mini-os OBJ_DIR=/usr/src/xen-4.6.0/stubdom/mini-os-x86_64-libvmi APP_OBJS=/usr/src/xen-4.6.0/stubdom/libvmi/example/process-list.a make[1]: Entering directory `/usr/src/xen-4.6.0/extras/mini-os' make[1]: *** No rule to make target `/usr/src/xen-4.6.0/stubdom/libvmi/example/process-list.a', needed by `/usr/src/xen-4.6.0/stubdom/mini-os-x86_64-libvmi/mini-os_app.o'. Stop. make[1]: Leaving directory `/usr/src/xen-4.6.0/extras/mini-os' make: *** [libvmi-stubdom] Error 2 ```
Obviously, It has finished the makefile in /xen/stubdom/libvmi, then it goes wrong.
I have tried to add related rules, such as ar process-list.a process-list.o, in the Makefile in directory libvmi, but it did not work correctly.
And I didn’t find any related rules in mini-os directory Makefile.
Where should I add the rules to run this correctly? Thanks a lot.
发件人: Ian Campbell
发送时间: 2016年1月14日 19:06
收件人: Du Yukun; [email protected]
主题: Re: [Xen-devel] [stubdom] Makefile configuration failed for user-defined studbom
Quoted 5 lines · Du Yukun
Hi, everyone!
I am trying to add my own program as a stubdom. I failed several times with theMakefile. I have add my own party in xen/stubdom/Makefile. It works fine except the mini-os section saying that no rule for targetAPP_OBJS
Please post the actual error message.
Please also post in plain text and avoid wrapping (since it is important to the Makefile syntax). In fact it might be best to post your modifications (all of them) as a patch to remove any ambiguity.
Quoted 8 lines
I only modified the xen/stubdom/Makefile and configure.ac. Can anyone help me with this problem. Thanks a lot.
~~~~~~~~~~~~~~~~~~~~ I added this part into theMakefilein stubdom .PHONY: libvmi-stubdom
libvmi-stubdom: mini-os-$(XEN_TARGET_ARCH)-libvmi libxc libvmi DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)"
Quoted 8 lines
MINIOS_CONFIG="$(CURDIR)/libvmi/minios.cfg" $(MAKE ) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/libvmi/example/process-list.a
~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
On Thu, 2016-01-14 at 21:27 +0800, Yukun Du wrote:
Please don't top post and please don't post HTML mails (use plain text instead).
Quoted 31 lines
Hi, Ian
The error message is this:
```
make[2]: Leaving directory/usr/src/xen-4.6.0/stubdom/libvmi' make[1]: Leaving directory/usr/src/xen-4.6.0/stubdom/libvmi' DEF_CPPFLAGS="-isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem/usr/src/xen-4.6.0/stubdom/../tools/xenstore/include -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86 -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86/x86_64 -U__linux__-U__FreeBSD__-U__sun__-nostdinc -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem/usr/src/xen-4.6.0/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include-isystem/usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include -isystem/usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include/ipv4 -isystem/usr/src/xen-4.6.0/stubdom/libvmi/libvmi -I/usr/src/xen-4.6.0/stubdom/include(quoted diff) +0
-2-I/usr/src/xen-4.6.0/stubdom/../xen/include" DEF_CFLAGS="-mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set- variable -Wno-unused-local-typedefs -fno-stack-protector -fno- exceptions" DEF_LDFLAGS="-nostdlib -L/usr/src/xen-4.6.0/stubdom/cross- root-x86_64/x86_64-xen-elf/lib" MINIOS_CONFIG="/usr/src/xen- 4.6.0/stubdom/libvmi/minios.cfg" make DESTDIR= -C
/usr/src/xen-4.6.0/stubdom/../extras/mini-os OBJ_DIR=/usr/src/xen-4.6.0/stubdom/mini- os-x86_64-libvmi APP_OBJS=/usr/src/xen- 4.6.0/stubdom/libvmi/example/process-list.a
make[1]: Entering directory/usr/src/xen-4.6.0/extras/mini-os' make[1]: *** No rule to make target/usr/src/xen-
Quoted 8 lines
4.6.0/stubdom/libvmi/example/process-list.a', needed by
/usr/src/xen- 4.6.0/stubdom/mini-os-x86_64-libvmi/mini-os_app.o'. Stop. make[1]: Leaving directory/usr/src/xen-4.6.0/extras/mini-os'
make: *** [libvmi-stubdom] Error 2
```
Obviously, It has finished the makefile in /xen/stubdom/libvmi, then it goes wrong.
Why obviously? Does process-list.a actually exist? Is it mentioned in the libvmi build system? What lead you to pick it as the target to depend on?
You still haven't posted your patch, please do so.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 51 lines
At 2016-01-14 21:56:13, Ian Campbell wrote:
Please don't top post and please don't post HTML mails (use plain text instead).
Quoted 37 lines
Hi, Ian
The error message is this:
```
make[2]: Leaving directory/usr/src/xen-4.6.0/stubdom/libvmi' make[1]: Leaving directory/usr/src/xen-4.6.0/stubdom/libvmi' DEF_CPPFLAGS="-isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem/usr/src/xen-4.6.0/stubdom/../tools/xenstore/include -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86 -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/x86/x86_64 -U__linux__-U__FreeBSD__-U__sun__-nostdinc -isystem/usr/src/xen-4.6.0/stubdom/../extras/mini-os/include/posix -isystem/usr/src/xen-4.6.0/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include-isystem/usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include -isystem/usr/src/xen-4.6.0/stubdom/lwip-x86_64/src/include/ipv4 -isystem/usr/src/xen-4.6.0/stubdom/libvmi/libvmi -I/usr/src/xen-4.6.0/stubdom/include(quoted diff) +0
-2-I/usr/src/xen-4.6.0/stubdom/../xen/include" DEF_CFLAGS="-mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-
variable -Wno-unused-local-typedefs -fno-stack-protector -fno-
exceptions" DEF_LDFLAGS="-nostdlib -L/usr/src/xen-4.6.0/stubdom/cross- root-x86_64/x86_64-xen-elf/lib" MINIOS_CONFIG="/usr/src/xen- 4.6.0/stubdom/libvmi/minios.cfg" make DESTDIR= -C/usr/src/xen-4.6.0/stubdom/../extras/mini-os OBJ_DIR=/usr/src/xen-4.6.0/stubdom/mini- os-x86_64-libvmi APP_OBJS=/usr/src/xen- 4.6.0/stubdom/libvmi/example/process-list.a
make[1]: Entering directory/usr/src/xen-4.6.0/extras/mini-os' make[1]: *** No rule to make target/usr/src/xen-4.6.0/stubdom/libvmi/example/process-list.a', needed by/usr/src/xen- 4.6.0/stubdom/mini-os-x86_64-libvmi/mini-os_app.o'. Stop. make[1]: Leaving directory/usr/src/xen-4.6.0/extras/mini-os'
make: *** [libvmi-stubdom] Error 2
```Quoted 2 lines
Obviously, It has finished the makefile in /xen/stubdom/libvmi, then it goes wrong.
Why obviously? Does process-list.a actually exist? Is it mentioned in the libvmi build system? What lead you to pick it as the target to depend on?
Quoted 3 lines
You still haven't posted your patch, please do so.
Ian.
Hi, Ian
Thank you for your reply and patience, this is my first time to use mail list.
When I run make, the object files or executable file are generated in directory libVMI. So I know the makefile in stubdom/libVMI/ has finished, And I also posted the diff file of stubdom directory which I have make changes on. Please check the attachment. Thank you again.
usr/src/xen-4.6.0/stubdom/configure renamed from usr/src/xen-back/xen-4.6.0/stubdom/configure +43 -0
@@ -630,6 +630,7 @@ debug xenstore grub +libvmi caml c host_os
@@ -684,6 +685,7 @@ enable_ioemu_stubdom enable_c_stubdom enable_caml_stubdom +enable_libvmi_stubdom enable_pv_grub enable_xenstore_stubdom enable_vtpm_stubdom
@@ -1326,6 +1328,8 @@ --enable-ioemu-stubdom Build and install ioemu-stubdom --enable-c-stubdom Build and install c-stubdom (default is DISABLED) --enable-caml-stubdom Build and install caml-stubdom (default is DISABLED) + --enable-libvmi-stubdom Build and install libvmi-stubdom (default is + DISABLED) --disable-pv-grub Build and install pv-grub (default is ENABLED) --disable-xenstore-stubdom Build and install xenstore-stubdom (default is
@@ -2076,6 +2080,45 @@ +# added by dyk + +# Check whether --enable-libvmi-stubdom was given. +if test "${enable_libvmi_stubdom+set}" = set; then : + enableval=$enable_libvmi_stubdom; + +if test "x$enableval" = "xyes"; then : + + +libvmi=y +STUBDOM_TARGETS="$STUBDOM_TARGETS libvmi" +STUBDOM_BUILD="$STUBDOM_BUILD libvmi-stubdom" +STUBDOM_INSTALL="$STUBDOM_INSTALL install-libvmi" + + +else + +if test "x$enableval" = "xno"; then : + + +libvmi=n + + +fi + +fi + + +else + + +libvmi=n + + +fi + + + +# end # Check whether --enable-pv-grub was given. if test "${enable_pv_grub+set}" = set; then :
usr/src/xen-4.6.0/stubdom/configure.ac renamed from usr/src/xen-back/xen-4.6.0/stubdom/configure.ac +3 -0
@@ -21,6 +21,9 @@ AX_STUBDOM_CONDITIONAL([ioemu-stubdom], [ioemu]) AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c]) AX_STUBDOM_DEFAULT_DISABLE([caml-stubdom], [caml]) +# added by dyk +AX_STUBDOM_DEFAULT_DISABLE([libvmi-stubdom], [libvmi]) +# end AX_STUBDOM_DEFAULT_ENABLE([pv-grub], [grub]) AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore]) AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
usr/src/xen-4.6.0/stubdom/libvmi/examples/Makefile renamed from usr/src/xen-back/xen-4.6.0/stubdom/libvmi/examples/Makefile +4 -1
@@ -441,7 +441,7 @@ win_guid_SOURCES = win-guid.c win-guid.h step_event_example_SOURCES = step-event-example.c va_pages_SOURCES = va-pages.c -all: all-recursive +all: all-recursive process-list.a .SUFFIXES: .SUFFIXES: .c .lo .o .obj
@@ -812,6 +812,9 @@ clean-generic: +process-list.a: process-list.o + $(AR) cr $@ $< + distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
usr/src/xen-4.6.0/stubdom/Makefile renamed from usr/src/xen-back/xen-4.6.0/stubdom/Makefile +23 -2
@@ -49,6 +49,9 @@ TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include/ipv4 +# DYK: add libvmi part +TARGET_CPPFLAGS += -isystem $(CURDIR)/libvmi/libvmi + TARGET_CPPFLAGS += -I$(CURDIR)/include TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include
@@ -265,6 +268,7 @@ $(MAKE) -C ocaml-$(XEN_TARGET_ARCH) install touch $@ + ####### # Links #######
@@ -346,7 +350,7 @@ $(MAKE) DESTDIR= -C $(MINI_OS) links CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH) - libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a +libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a ####### # ioemu
@@ -380,6 +384,17 @@ c: $(CROSS_ROOT) CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) + +######## +# LIBVMI +######## + +## may be wrong cause no lib was added here + +.PHONY: libvmi +libvmi: $(CROSS_ROOT) + CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ + ###### # VTPM ######
@@ -442,12 +457,16 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a +.PHONY: libvmi-stubdom +libvmi-stubdom: mini-os-$(XEN_TARGET_ARCH)-libvmi libxc libvmi + DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/libvmi/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/libvmi/example/process-list.a + .PHONY: vtpm-stubdom vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" APP_LDLIBS="-ltpm -ltpm_crypto -lgmp -lpolarssl" .PHONY: vtpmmgr-stubdom -vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr +vtpmmgr-stubdmm: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl" .PHONY: pv-grub
@@ -481,6 +500,8 @@ install-c: c-stubdom +install-libvmi: libvmi-stubdom + install-caml: caml-stubdom install-xenstore: xenstore-stubdom
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 1 line · Du Yukun
Quoted 1 line
Quoted 1 line
4.6.0/stubdom/libvmi/example/process-list.a', needed by `/usr/src/xen-
^
here it says "example".
Quoted 1 line
+++
/usr/src/xen-4.6.0/stubdom/libvmi/examples/Makefile2016-01-13 15:51:28.586127901 +0800
Here it says "examples".
If this: https://github.com/libvmi/libvmi/tree/master/examples is the same libvmi project then it is examples there too.
I think you just have a typo.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel